from django.db import models

#供应商

#厂家
class Vender(models.Model):
    #厂家名
    vender_name = models.CharField(max_length = 20,unique=True)
    #厂家所有人
    vender_boss = models.CharField(max_length = 20)
    #厂家地址
    vender_site = models.CharField(max_length = 50)
    #厂家电话
    vender_phone = models.IntegerField(default=0)

#产品
class Entity(models.Model):

    #品牌具体有哪些卖的,单价 

    entity = models.CharField(max_length = 20)

    price = models.IntegerField(blank = True,null = True)

    vender = models.ForeignKey(Vender,on_delete=models.CASCADE)

